package com.tengju.user.domain.model.chief;

import com.fasterxml.jackson.annotation.JsonCreator;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author: 大木
 * @date: 2021/12/24 3:05 下午
 */
@Getter
@AllArgsConstructor
public enum ChiefSecRelationType {

    NORMAL_VIEW(0, "查看关系"),

    DIRECT_MANAGE(10, "直接管理关系"),
    ;

    Integer val;
    String desc;

    @JsonCreator
    public static ChiefSecRelationType fromVal(Integer val) {
        for (ChiefSecRelationType type : values()) {
            if (type.val.equals(val)) {
                return type;
            }
        }
        return null;
    }

}
